#ifndef GLOBLE_DEF_H
#define GLOBLE_DEF_H

//color
#define BKGCLR QColor(0,0,0)
#define BKGCLRLIGHT QColor(64,64,64)
#define BTNBKGCLR QColor(64,64,64)
//stylesheet
#define NaviBtnStyle        "QPushButton{background-color:rgb(64,64,64);font:22pt 'Arial';color:rgb(255,255,255);border-radius:8px;}\
                             QPushButton:checked{background-color:rgb(0,100,255);font:22pt 'Arial';color:rgb(255,255,255);border-radius:8px;}"

#define SideNaviBtnStyle    "QPushButton{background-color:rgb(64,64,64);font:18pt 'Arial';color:rgb(255,255,255);border-radius:8px;}\
                             QPushButton:checked{background-color:rgb(0,100,255);font:18pt 'Arial';color:rgb(255,255,255);border-radius:8px;}\
                             QPushButton:pressed{background-color:rgb(0,100,255);font:18pt 'Arial';color:rgb(255,255,255);border-radius:8px;}\
                             QPushButton:disabled{background-color:rgb(64,64,64);font:18pt 'Arial';color:rgb(99,99,99);border-radius:8px;}"

#define StationBtnStyle     "QPushButton{background-color:rgb(64,64,64);font:16pt 'Arial';color:rgb(255,255,255);border-radius:8px;}\
                             QPushButton:checked{background-color:rgb(0,100,255);font:16pt 'Arial';color:rgb(255,255,255);border-radius:8px;}\
                             QPushButton:pressed{background-color:rgb(0,100,255);font:16pt 'Arial';color:rgb(255,255,255);border-radius:8px;}\
                             QPushButton:disabled{font:16pt 'Arial';color:rgb(99,99,99);border-radius:8px;}"

#define StationBtnYellowStyle     "QPushButton{background-color:rgb(64,64,64);font:16pt 'Arial';color:rgb(255,255,255);border:2px solid rgb(255,255,0);border-radius:8px;}\
                                   QPushButton:checked{background-color:rgb(0,100,255);font:16pt 'Arial';color:rgb(255,255,255);border:2px solid rgb(255,255,0);border-radius:8px;}\
                                   QPushButton:pressed{background-color:rgb(0,100,255);font:16pt 'Arial';color:rgb(255,255,255);border:2px solid rgb(255,255,0);border-radius:8px;}\
                                   QPushButton:disabled{font:16pt 'Arial';color:rgb(99,99,99);border:2px solid rgb(255,255,0);border-radius:8px;}"

#define LabelStyle          "QLabel{background-color:black;border:1px solid rgb(64,64,64);font:15pt 'Arial';color:white;}"
#define LabelNBStyle        "QLabel{background-color:black;font:15pt 'Arial';color:white;}"
#define LabelYellowStyle    "QLabel{background-color:rgb(255,255,0);border:1px solid rgb(64,64,64);font:15pt 'Arial';color:black;}"
#define LabelWhiteStyle     "QLabel{background-color:white;border:1px solid rgb(64,64,64);font:18pt 'Arial';color:black;}"
#define LabelRedStyle       "QLabel{background-color:red;border:1px solid rgb(64,64,64);font:15pt 'Arial';color:black;}"
#define LabelGreenStyle     "QLabel{background-color:rgb(0,255,0);border:1px solid rgb(64,64,64);font:15pt 'Arial';color:black;}"
#define LabelGrayStyle      "QLabel{background-color:rgb(147,147,147);border:1px solid rgb(64,64,64);font:15pt 'Arial';color:black;}"
#define LabelBlueStyle      "QLabel{background-color:rgb(0,10,255);border:1px solid rgb(64,64,64);font:15pt 'Arial';color:white;}"
#define LabelOrangeStyle    "QLabel{background-color:rgb(255,127,39);border:1px solid rgb(64,64,64);font:15pt 'Arial';color:white;}"
//Train paramater
#define SaloonCnt 6
#define SaloonDorCnt 8
#define AuxCnt 4
#define BatChargerCnt 4
#define CAR(x) x
#define ROW(x) x
#define COL(x) x
#define TOTAL(x) x

//mini car paramater
#define MiniSaloonStyle         "QLabel{background-color:rgb(64,64,64);border:1px solid rgb(147,147,147);border-radius:5px;font:18pt 'Arial';color:white;}"
#define MiniUnTracWheelStyle    "QLabel{background-color:rgb(64,64,64);border:1px solid rgb(147,147,147);border-radius:8px;font:15pt 'Arial';color:white;}"
#define MiniTracWheelStyle      "QLabel{background-color:white;border:1px solid rgb(147,147,147);border-radius:8px;font:15pt 'Arial';color:white;}"

#define MiniCarLeftSpace_1220 205
#define MiniCarRightSpace_1220 140
#define MiniCarTopSpace_1220 10
#define MiniCarBottomSpace_1220 20
#define MiniCarHSpace_1220 6
#define MiniCarWheelSize_1220 16
#define MiniCarSaloonWidth (1220-MiniCarLeftSpace_1220-MiniCarRightSpace_1220-(SaloonCnt-1)*MiniCarHSpace_1220)/SaloonCnt
//hvac
#define StatLabelStyle      "QLabel{background-color:black;border:1px solid rgb(147,147,147);font:15pt 'Arial';color:white;}"
//traction block
#define StatLabelStyle_TB      "QLabel{background-color:black;border:1px solid rgb(147,147,147);font:18pt 'Arial';color:white;}"
#define LabelRedStyle_TB       "QLabel{background-color:red;border:1px solid rgb(64,64,64);font:18pt 'Arial';color:black;}"

enum
{
    Page_Operation=0,
    Page_Operation_SpdLimit,
    Page_Operation_EBTrig,
    Page_Operation_Bypass,
    Page_Operation_SelfTest,
    Page_Operation_TracBlock,
    Page_Operation_Help,
    Page_Vehcile_Traction=10,
    Page_Vehcile_Brake,
    Page_Vehcile_Aux,
    Page_Vehcile_Battery,
    Page_Vehcile_Fire,
    Page_Vehcile_PECU,
    Page_HVAC=20,
    Page_PIS_ModeSetting=30,
    Page_PIS_StationSelect,
    Page_PIS_SkipStationSelect,
    Page_PIS_EmBroadCastSetting,
    Page_PIS_VolumeSetting,
    Page_Setting_ResetPCESIV=40,
    Page_Setting_BackLight,
    Page_Event_Cur=50,
    Page_Event_His,
    Page_Maint_Login=60,
    Page_Maint_Menu,
    Page_Maint_TimeSet,
    Page_Maint_WheelSet,
    Page_Maint_TrainNumSet,
    Page_Maint_PasswordSet,
    Page_Maint_LCUBoardSet,
    Page_Maint_CleanBrk,
    Page_Maint_DorParSet,
    Page_Maint_Accumulation,
    Page_Maint_SpeedTest,
    Page_Maint_ManualSelfTest,
    Page_Maint_PISBreakerTest,
    Page_Maint_OtherTest,
    Page_Maint_Version,
    Page_Maint_Interface,
    Page_Maint_Network,
    Page_Maint_KeyCBStat,
    Page_Maint_Energy,
    Page_Maint_Switch,
    Page_Maint_Battery,
    Page_Maint_Hardware,

    Page_Maint_EDBCut,
    Page_Maint_HSCBTest,
    Page_Maint_WheelLubTest
};

enum
{
    Page_CCTV_RealTimeMonitor=0,
    Page_CCTV_PlayRecord=10,
    Page_CCTV_MedieaManage=20
};

enum
{
    SubSystem_VCU,
    SubSystem_SCU,
    SubSystem_RIOM,
    SubSystem_DDU,
    SubSystem_LCU,
    SubSystem_Traction,
    SubSystem_Aux,
    SubSystem_Brake,
    SubSystem_EDCU,
    SubSystem_HVAC,
    SubSystem_PIS,
    SubSystem_BMS,
    SubSystem_ATC,
    SubSystem_FAU,
    SubSystem_PHM,
    SubSystem_ICDS,
    SubSystem_Cout
};

enum
{
    CFG_RECV, CFG_RIOM, CFG_SEND, CFG_SUBSYS
};

enum
{
    PIS_ModeAuto,
    PIS_ModeMannual,
    PIS_ModeSemiAuto
};

enum
{
    HVAC_Auto=1,
    HVAC_Man,
    HVAC_Vent,
    HVAC_Stop,
    HVAC_OnlyTC
};

enum
{
    Network_BlueAndRed,
    Network_Red,
    Network_Blue
};

enum
{
    DEC_Display,
    HEX_Display,
    ASCII_Display
};

#endif // GLOBLE_DEF_H
